#!/usr/bin/bash
#
# Update the name of images whose prefix is 'tone_'. Note that it is just
# a workaround to avoid updating the config file 'docker_compose.yaml'.
#

images=$(sudo docker images | grep -E 'tone_tone' | awk '{print $1}')
for image in $images; do
    dst_image=${image#tone_}
    sudo docker tag $image:latest $dst_image:latest
    sudo docker rmi $image:latest
done
